package com.article.controller;

import com.article.common.PageParam;
import com.article.common.ResultBody;
import com.article.model.Message;
import com.article.model.User;
import com.article.service.IMessageService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;


/**
 * @author lx
 */
@Controller
@RequestMapping("/wx/message")
public class WxMessageController {
	 private static final Logger log=LoggerFactory.getLogger(WxMessageController.class);
	 @Resource
	 private IMessageService service;

    /**
     * 新增
     * @param message
     */
    @RequestMapping(value = "/add",method = RequestMethod.POST)
    @ResponseBody
    public ResultBody add(Message message){
        this.service.add(message);
        return ResultBody.success("添加成功");
    }

}
